# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""

from django.urls import re_path

from . import views

# urlpatterns = (
#     re_path(r"^$", views.home),
#     re_path(r"^dev-guide/$", views.dev_guide),
#     re_path(r"^contact/$", views.contact),
# )

urlpatterns = [
    re_path(r"^$", views.home, name="home"),
    re_path(r"^dev-guide/$", views.dev_guide, name="dev_guide"),
    re_path(r"^contact/$", views.contact, name="contact"),
    # 数据库备份
    re_path(r"^backup/$", views.backup_view, name="backup"),
    # 恢复数据库
    re_path(r"^restore-database/$", views.restore_database, name="restore_database"),
    # 注册
    re_path(r"^register/$", views.register_view, name="register"),
    # 登录
    re_path(r"^login/$", views.login_view, name="login"),
    # 退出登录
    re_path(r"^logout/$", views.logout_view, name="logout"),
    re_path(r"^audit_logs/$", views.view_audit_logs, name="view_audit_logs"),  # 日志记录页面（全部日志列表）
    re_path(r"^log/(?P<log_id>\d+)/$", views.view_log_detail, name="view_log_detail"),  # 详细单条日志信息
    re_path(r"^clear_message/$", views.clear_message, name="clear_message"),  # 清理 session




    # 掌子面导出
    re_path(r"^geological/export/$", views.export_geological_view, name="export_geological_view"),
    re_path(r"^geological/export/records/$", views.export_geological_records, name="export_geological_records"),
    # 超欠挖计算导出
    re_path(r"^calculation/export/$", views.export_excavation_calculation_view, name="export_excavation_calculation_view"),
    re_path(r"^calculation/export/records/$", views.export_excavation_calculation_records, name="export_excavation_calculation_records"),
    # 超欠挖诊断导出
    re_path(r"^diagnosis/export/$", views.export_excavation_diagnosis_view, name="export_excavation_diagnosis_view"),
    re_path(r"^diagnosis/export/records/$", views.export_excavation_diagnosis_records, name="export_excavation_diagnosis_records"),
    # 隧道轮廓导出
    re_path(r"^tunnel/export/$", views.export_tunnel_contour_view, name="export_tunnel_contour_view"),
    re_path(r"^tunnel/export/records/$", views.export_tunnel_contour_records, name="export_tunnel_contour_records"),



    # 四个上传（管理员）
    re_path(r"^upload_geological_info/$", views.upload_geological_info, name="upload_geological_info"),  # 管理员上传地质信息（四种都有，进去在掌子面这里）
    re_path(r"^upload/info1/$", views.upload_info1, name="upload_info1"),  # 隧道信息管理员上传
    re_path(r"^upload/info2/$", views.upload_info2, name="upload_info2"),  # 超欠挖诊断信息管理员上传
    re_path(r"^upload/info3/$", views.upload_info3, name="upload_info3"),  # 超欠挖计算信息管理员上传

    # 四个用户上传页面
    re_path(r"^upload/user/$", views.upload_geological_info_user, name="upload_geological_info_user"),  # 用户上传掌子面
    re_path(r"^upload/excavation-calculation/user/$", views.upload_excavation_calculation_user, name="upload_excavation_calculation_user"),  # 用户上传超欠挖计算
    re_path(r"^upload/excavation-diagnosis/user/$", views.upload_excavation_diagnosis_user, name="upload_excavation_diagnosis_user"),  # 用户上传超欠挖诊断
    re_path(r"^upload/tunnel-info/user/$", views.upload_tunnel_info_user, name="upload_tunnel_info_user"),  # 用户上传隧道信息


    # 统计数据
    re_path(r"^geological/statistics/$", views.geological_statistics, name="geological_statistics"),
    re_path(r"^statistics/excavation/$", views.excavation_calculation_statistics, name="excavation_statistics"),
    re_path(r"^statistics/diagnosis/$", views.excavation_diagnosis_statistics, name="diagnosis_statistics"),
    re_path(r"^statistics/tunnel/$", views.tunnel_statistics, name="tunnel_statistics"),

    # 用户管理
    re_path(r"^users/$", views.user_management, name="user_management"),
    re_path(r"^users/delete/(?P<user_id>\d+)/$", views.delete_user, name="delete_user"),
    re_path(r"^users/edit/(?P<user_id>\d+)/$", views.edit_user, name="edit_user"),
    re_path(r"^users/add/$", views.add_user, name="add_user"),

    # 个人中心
    re_path(r"^geological-records/$", views.user_records_view, name="user_records_view"),
    re_path(r"^excavation-calculation-records/$", views.excavation_calculation_records_view, name="excavation_calculation_records"),
    re_path(r"^excavation-diagnosis-records/$", views.excavation_diagnosis_records_view, name="excavation_diagnosis_records"),
    re_path(r"^tunnel-contour-records/$", views.tunnel_contour_records_view, name="tunnel_contour_records"),

    # 用户修改、删除自己的新增待审批信息
    re_path(r"^records/edit/(?P<record_id>\d+)/$", views.edit_pending_record, name="edit_pending_record"),
    re_path(r"^records/delete/(?P<record_id>\d+)/$", views.delete_pending_record, name="delete_pending_record"),
    re_path(r"^edit/pending/excavation/(?P<record_id>\d+)/$", views.edit_pending_excavation_diagnosis, name="edit_pending_excavation_diagnosis"),
    re_path(r"^edit/pending/overunder/(?P<record_id>\d+)/$", views.edit_pending_over_under_excavation, name="edit_pending_over_under_excavation"),
    re_path(r"^edit/pending/tunnel/(?P<record_id>\d+)/$", views.edit_pending_tunnel_contour, name="edit_pending_tunnel_contour"),
    re_path(r"^delete/pending/excavation/(?P<record_id>\d+)/$", views.delete_pending_excavation_diagnosis, name="delete_pending_excavation_diagnosis"),
    re_path(r"^delete/pending/overunder/(?P<record_id>\d+)/$", views.delete_pending_over_under_excavation, name="delete_pending_over_under_excavation"),
    re_path(r"^delete/pending/tunnel/(?P<record_id>\d+)/$", views.delete_pending_tunnel_contour, name="delete_pending_tunnel_contour"),

    # 申请修改、删除已审批信息
    re_path(r"^records/apply_edit/(?P<record_id>\d+)/$", views.apply_edit_record, name="apply_edit_record"),
    re_path(r"^records/apply_delete/(?P<record_id>\d+)/$", views.apply_delete_record, name="apply_delete_record"),
    re_path(r"^apply_edit_excavation_diagnosis/(?P<record_id>\d+)/$", views.apply_edit_excavation_diagnosis, name="apply_edit_excavation_diagnosis"),
    re_path(r"^apply_delete_excavation_diagnosis/(?P<record_id>\d+)/$", views.apply_delete_excavation_diagnosis, name="apply_delete_excavation_diagnosis"),
    re_path(r"^apply_edit_over_under_excavation_calculation/(?P<record_id>\d+)/$", views.apply_edit_over_under_excavation_calculation, name="apply_edit_over_under_excavation_calculation"),
    re_path(r"^apply_delete_over_under_excavation_calculation/(?P<record_id>\d+)/$", views.apply_delete_over_under_excavation_calculation, name="apply_delete_over_under_excavation_calculation"),
    re_path(r"^apply_edit_tunnel_contour_info/(?P<record_id>\d+)/$", views.apply_edit_tunnel_contour_info, name="apply_edit_tunnel_contour_info"),
    re_path(r"^apply_delete_tunnel_contour_info/(?P<record_id>\d+)/$", views.apply_delete_tunnel_contour_info, name="apply_delete_tunnel_contour_info"),

    # 修改、删除待审批信息
    re_path(r"^records/edit_modified/(?P<record_id>\d+)/$", views.edit_modified_pending_record, name="edit_modified_pending_record"),
    re_path(r"^records/delete_modified/(?P<record_id>\d+)/$", views.delete_modified_pending_record, name="delete_modified_pending_record"),
    re_path(r"^edit/modified/excavation/(?P<record_id>\d+)/$", views.edit_modified_pending_excavation_diagnosis, name="edit_modified_pending_excavation_diagnosis"),
    re_path(r"^edit/modified/overunder/(?P<record_id>\d+)/$", views.edit_modified_pending_over_under_excavation, name="edit_modified_pending_over_under_excavation"),
    re_path(r"^edit/modified/tunnel/(?P<record_id>\d+)/$", views.edit_modified_pending_tunnel_contour, name="edit_modified_pending_tunnel_contour"),
    re_path(r"^delete/modified/excavation/(?P<record_id>\d+)/$", views.delete_modified_pending_excavation_diagnosis, name="delete_modified_pending_excavation_diagnosis"),
    re_path(r"^delete/modified/overunder/(?P<record_id>\d+)/$", views.delete_modified_pending_over_under_excavation, name="delete_modified_pending_over_under_excavation"),
    re_path(r"^delete/modified/tunnel/(?P<record_id>\d+)/$", views.delete_modified_pending_tunnel_contour, name="delete_modified_pending_tunnel_contour"),

    # 取消删除申请
    re_path(r"^records/delete_deleted/(?P<record_id>\d+)/$", views.delete_deleted_pending_record, name="delete_deleted_pending_record"),
    re_path(r"^cancel/delete/excavation/(?P<record_id>\d+)/$", views.cancel_delete_pending_excavation_diagnosis, name="cancel_delete_pending_excavation_diagnosis"),
    re_path(r"^cancel/delete/overunder/(?P<record_id>\d+)/$", views.cancel_delete_pending_over_under_excavation, name="cancel_delete_pending_over_under_excavation"),
    re_path(r"^cancel/delete/tunnel/(?P<record_id>\d+)/$", views.cancel_delete_pending_tunnel_contour, name="cancel_delete_pending_tunnel_contour"),

    # 重新申请
    re_path(r"^records/reapply/(?P<record_id>\d+)/$", views.reapply_record, name="edit_record"),
    re_path(r"^excavation-diagnosis/reapply/(?P<record_id>\d+)/$", views.reapply_excavation_diagnosis, name="reapply_excavation_diagnosis"),
    re_path(r"^over-under-calculation/reapply/(?P<record_id>\d+)/$", views.reapply_over_under_calculation, name="reapply_over_under_calculation"),
    re_path(r"^tunnel-contour/reapply/(?P<record_id>\d+)/$", views.reapply_tunnel_contour, name="reapply_tunnel_contour"),

    # 查看详细信息
    re_path(r"^view-geological/(?P<record_id>\d+)/$", views.view_GeologicalSketchRecord, name="view_GeologicalSketchRecord"),
    re_path(r"^view-excavation-diagnosis/(?P<record_id>\d+)/$", views.view_ExcavationDiagnosis, name="view_ExcavationDiagnosis"),
    re_path(r"^view-over-under-excavation/(?P<record_id>\d+)/$", views.view_OverUnderExcavation, name="view_OverUnderExcavation"),
    re_path(r"^view-tunnel-contour/(?P<record_id>\d+)/$", views.view_TunnelContour, name="view_TunnelContour"),




]

